package com.cd.music.dto;

import java.util.Date;

/**
 * @author yxl 余秀良
 * @version 1.0
 * @description: 用户DTO
 * @date 2018年02月07日 下午3:56
 * @address: 四川成都
 */
public class UserDto extends BaseDto {
    private String id;
    private String name;
    private int sign;
    private String roleName;
    private String phone;
    private String email;
    private String userId;
    private Date createTime;
    private int loginStatus;
    private Date lastLoginTime;
    private String password;
    private String confirmPassword;
    private String verificationCode;
    private String position;
    private String ipAddress;
    private String deviceType;
    private String deviceModel;
    private String identityType;
    private int accountStatus;
    private String gender;
    private String address;
    private String remark;
    private String ip;
    private boolean isLogin;
    private String message;
    private int fCodeTotal;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Date getCreateTime() {
        return createTime != null ? (Date) createTime.clone() : null;
    }

    public void setCreateTime(Date createTime) {
        if (createTime != null) {
            this.createTime = (Date) createTime.clone();
        }
    }

    public Integer getLoginStatus() {
        return loginStatus;
    }

    public void setLoginStatus(int loginStatus) {
        this.loginStatus = loginStatus;
    }

    public Date getLastLoginTime() {
        return lastLoginTime != null ? (Date) lastLoginTime.clone() : null;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        if (lastLoginTime != null) {
            this.lastLoginTime = (Date) lastLoginTime.clone();
        }
    }

    public String getPassword() {
        return password = password != null ? password.trim() : null;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getConfirmPassword() {
        return confirmPassword = confirmPassword != null ? confirmPassword.trim() : null;
    }

    public void setConfirmPassword(String confirmPassword) {
        this.confirmPassword = confirmPassword;
    }

    public String getVerificationCode() {
        return verificationCode;
    }

    public void setVerificationCode(String verificationCode) {
        this.verificationCode = verificationCode;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getDeviceModel() {
        return deviceModel;
    }

    public void setDeviceModel(String deviceModel) {
        this.deviceModel = deviceModel;
    }

    public String getIdentityType() {
        return identityType;
    }

    public void setIdentityType(String identityType) {
        this.identityType = identityType;
    }

    public int getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(int accountStatus) {
        this.accountStatus = accountStatus;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public boolean getIsLogin() {
        return isLogin;
    }

    public void setIsLogin(boolean login) {
        isLogin = login;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public int getSign() {
        return sign;
    }

    public void setSign(int sign) {
        this.sign = sign;
    }

    public int getfCodeTotal() {
        return fCodeTotal;
    }

    public void setfCodeTotal(int fCodeTotal) {
        this.fCodeTotal = fCodeTotal;
    }

    public UserDto() {

    }

    private UserDto(Builder builder) {
        setId(builder.id);
        setName(builder.name);
        setRoleName(builder.roleName);
        setPhone(builder.phone);
        setEmail(builder.email);
        setUserId(builder.userId);
        setCreateTime(builder.createTime);
        setLoginStatus(builder.loginStatus);
        setLastLoginTime(builder.lastLoginTime);
        setPassword(builder.password);
        setToken(builder.token);
        setVerificationCode(builder.verificationCode);
        setPosition(builder.position);
        setIpAddress(builder.ipAddress);
        setDeviceType(builder.deviceType);
        setDeviceModel(builder.deviceModel);
        setIdentityType(builder.identityType);
        setAccountStatus(builder.accountStatus);
        setGender(builder.gender);
        setAddress(builder.address);
        setRemark(builder.remark);
        setIp(builder.ip);
        setIsLogin(builder.isLogin);
        setMessage(builder.message);
        setPageIndex(builder.pageIndex);
        setPageSize(builder.pageSize);
        setSign(builder.sign);
        setfCodeTotal(builder.fCodeTotal);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private String id;
        private String name;
        private String roleName;
        private int sign;
        private String phone;
        private String email;
        private String userId;
        private Date createTime;
        private int loginStatus;
        private Date lastLoginTime;
        private String password;
        private String token;
        private String verificationCode;
        private String position;
        private String ipAddress;
        private String deviceType;
        private String deviceModel;
        private String identityType;
        private int accountStatus;
        private String gender;
        private String address;
        private String remark;
        private String ip;
        private boolean isLogin;
        private String message;
        private Integer pageIndex;
        private Integer pageSize;
        private int fCodeTotal;

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder roleName(String roleName) {
            this.roleName = roleName;
            return this;
        }

        public Builder phone(String phone) {
            this.phone = phone;
            return this;
        }

        public Builder email(String email) {
            this.email = email;
            return this;
        }


        public Builder userId(String userId) {
            this.userId = userId;
            return this;
        }

        public Builder createTime(Date createTime) {
            this.createTime = (Date) createTime.clone();
            return this;
        }


        public Builder loginStatus(Integer loginStatus) {
            this.loginStatus = loginStatus;
            return this;
        }


        public Builder lastLoginTime(Date lastLoginTime) {
            this.lastLoginTime = (Date) lastLoginTime.clone();
            return this;
        }


        public Builder password(String password) {
            this.password = password;
            return this;
        }


        public Builder token(String token) {
            this.token = token;
            return this;
        }


        public Builder verificationCode(String verificationCode) {
            this.verificationCode = verificationCode;
            return this;
        }


        public Builder position(String position) {
            this.position = position;
            return this;
        }


        public Builder ipAddress(String ipAddress) {
            this.ipAddress = ipAddress;
            return this;
        }


        public Builder deviceType(String deviceType) {
            this.deviceType = deviceType;
            return this;
        }


        public Builder deviceModel(String deviceModel) {
            this.deviceModel = deviceModel;
            return this;
        }


        public Builder identityType(String identityType) {
            this.identityType = identityType;
            return this;
        }


        public Builder accountStatus(int accountStatus) {
            this.accountStatus = accountStatus;
            return this;
        }


        public Builder gender(String gender) {
            this.gender = gender;
            return this;
        }


        public Builder address(String address) {
            this.address = address;
            return this;
        }


        public Builder remark(String remark) {
            this.remark = remark;
            return this;
        }


        public Builder ip(String ip) {
            this.ip = ip;
            return this;
        }


        public Builder isLogin(boolean login) {
            isLogin = login;
            return this;
        }


        public Builder message(String message) {
            this.message = message;
            return this;
        }


        public Builder pageIndex(Integer pageIndex) {
            this.pageIndex = pageIndex;
            return this;
        }

        public Builder pageSize(Integer pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder sign(int sign) {
            this.sign = sign;
            return this;
        }

        public Builder fCodeTotal(int fCodeTotal) {
            this.fCodeTotal = fCodeTotal;
            return this;
        }

        public UserDto build() {
            return new UserDto(this);
        }

    }
}
